{% extends 'ForkCMSInstallerBundle:Installer:base.html.twig' %}
{% import 'ForkCMSInstallerBundle:Installer:navigation.html.twig' as macro %}

{% form_theme form 'ForkCMSInstallerBundle:Installer:form_theme.html.twig' %}

{% block navigation %}
  {{ macro.navigation('step-2') }}
{% endblock %}

{% block content %}

  {{ form_start(form) }}
  <div class="row fork-module-messages">
    <div class="col-md-12">
      {{ form_errors(form) }}
    </div>
  </div>
  <div class="row fork-module-content">
    <div class="col-md-12">
      <div class="panel panel-default">
        <div class="panel-heading">
          <h2 class="panel-title">
            Settings
          </h2>
        </div>
        <div class="panel-body">
          <div class="form-group">
            <h3>Languages</h3>
            <p>Will your site be available in multiple languages or just one? Changing this setting later on will change your URL structure.</p>
            {{ form_widget(form.language_type) }}
            <ul id="languages" class="list-unstyled" style="display: none;">
              {{ form_widget(form.languages) }}
            </ul>
            <div>
              <p>What is the default language we should use for the website?</p>
              <p>
                {{ form_widget(form.default_language, { 'attr' : { 'class' : 'form-control' }}) }}
              </p>
            </div>
          </div>
          <div class="form-group last">
            <h3>CMS interface languages</h3>
            <p>What languages do you plan to use in the CMS interface?</p>
            <ul class="list-unstyled">
              <li class="checkbox">
                {{ form_widget(form.same_interface_language) }}
                {{ form_label(form.same_interface_language) }}
                <p id="interfaceLanguagesExplanation" style="display: none;">Select the language(s) you would like to use use in the CMS interface.</p>
                <ul id="interfaceLanguages" class="list-unstyled" style="display: none;">
                  {{ form_widget(form.interface_languages) }}
                </ul>
              </li>
            </ul>
            <div id="defaultInterfaceLanguageContainer">
              <p>What is the default language we should use for the CMS interface?</p>
              <p>
                {{ form_widget(form.default_interface_language, { 'attr' : { 'class' : 'form-control' }}) }}
              </p>
            </div>
          </div>
        </div>
        <div class="panel-footer">
          <div class="btn-toolbar">
            <div class="btn-group pull-right" role="group">
              <button type="submit" id="installerButton" name="installer" class="btn btn-primary">
                Next <span class="fa fa-chevron-right" aria-hidden="true"></span>
              </button>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
  {{ form_end(form) }}

{% endblock %}
